package com.neusoft.neuiotms.dcam.common.vo;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.Length;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.handler.inter.IExcelDataModel;
import cn.afterturn.easypoi.handler.inter.IExcelModel;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Setter
@Getter
@ToString
public class ManufacturerImportVO implements IExcelDataModel, IExcelModel {

    /** 供应商名称 */
    @Excel(name = "供应商名称", orderNum = "0")
    @NotBlank(message = "供应商名称不能为空")
    @Length(max = 255, message = "供应商名称不能超过{max}位")
    private String name;

    /** 供应商联系人 */
    @Excel(name = "供应商联系人", orderNum = "1")
    @NotBlank(message = "供应商联系人不能为空")
    @Length(max = 255, message = "供应商联系人不能超过{max}位")
    private String person;

    /** 供应商联系电话 */
    @Excel(name = "供应商联系电话", orderNum = "2")
    @NotBlank(message = "联系电话不能为空")
    @Length(max = 255, message = "联系电话不能超过{max}位")
    private String phone;

    /** 供应商地址 */
    @Excel(name = "供应商地址", orderNum = "3")
    @NotBlank(message = "供应商地址不能为空")
    @Length(max = 255, message = "供应商地址不能超过{max}位")
    private String address;

    /** 供应商开户行 */
    @Excel(name = "供应商开户行", orderNum = "4")
    @Length(max = 255, message = "联系电话不能超过{max}位")
    private String bank;

    /** 供应商账号 */
    @Excel(name = "供应商账号", orderNum = "5")
    @Length(max = 255, message = "联系电话不能超过{max}位")
    private String accountNumber;

    /** 供应商税号 */
    @Excel(name = "供应商税号", orderNum = "6")
    @Length(max = 255, message = "联系电话不能超过{max}位")
    private String taxId;

    /** 供应商邮编 */
    @Excel(name = "供应商邮编", orderNum = "7")
    @Pattern(regexp = "[1-9]\\d{5}", message = "非法邮编")
    private String postCode;

    /** 状态 */
    @Excel(name = "状态", orderNum = "8")
    @Length(max = 255, message = "联系电话不能超过{max}位")
    private String status;

    private int rowNum;

    private String errorMsg;

    @Override
    public Integer getRowNum() {
        return this.rowNum;
    }

    @Override
    public void setRowNum(final Integer rowNum) {
        this.rowNum = rowNum;
    }

    @Override
    public String getErrorMsg() {
        return this.errorMsg;
    }

    @Override
    public void setErrorMsg(final String errorMsg) {
        this.errorMsg = errorMsg;
    }

}
